﻿namespace Microsoft.Xml.Serialization.GeneratedAssembly
{
    using System;
    using System.Xml;
    using System.Xml.Serialization;

    public class XmlSerializationWriterSmsService : XmlSerializationWriter
    {
        protected override void InitCallbacks()
        {
        }

        public void Write1_SendMessage(object[] p)
        {
            base.WriteStartDocument();
            base.TopLevelElement();
            int length = p.Length;
            base.WriteStartElement("SendMessage", "http://tempuri.org/", null, false);
            if (length > 0)
            {
                base.WriteElementStringRaw("intSmsType", "http://tempuri.org/", XmlConvert.ToString((int) p[0]));
            }
            if (length > 1)
            {
                base.WriteElementString("strSmsSeries", "http://tempuri.org/", (string) p[1]);
            }
            if (length > 2)
            {
                base.WriteElementString("strSmsSerialPwd", "http://tempuri.org/", (string) p[2]);
            }
            if (length > 3)
            {
                base.WriteElementString("strSmsMobileList", "http://tempuri.org/", (string) p[3]);
            }
            if (length > 4)
            {
                base.WriteElementString("strSmsContent", "http://tempuri.org/", (string) p[4]);
            }
            if (length > 5)
            {
                base.WriteElementString("strSmsTime", "http://tempuri.org/", (string) p[5]);
            }
            base.WriteEndElement();
        }

        public void Write2_SendMessageInHeaders(object[] p)
        {
            base.WriteStartDocument();
            base.TopLevelElement();
            int length = p.Length;
        }

        public void Write3_GetBalance(object[] p)
        {
            base.WriteStartDocument();
            base.TopLevelElement();
            int length = p.Length;
            base.WriteStartElement("GetBalance", "http://tempuri.org/", null, false);
            if (length > 0)
            {
                base.WriteElementStringRaw("intSmsType", "http://tempuri.org/", XmlConvert.ToString((int) p[0]));
            }
            if (length > 1)
            {
                base.WriteElementString("strSmsSeries", "http://tempuri.org/", (string) p[1]);
            }
            if (length > 2)
            {
                base.WriteElementString("strSmsSerialPwd", "http://tempuri.org/", (string) p[2]);
            }
            base.WriteEndElement();
        }

        public void Write4_GetBalanceInHeaders(object[] p)
        {
            base.WriteStartDocument();
            base.TopLevelElement();
            int length = p.Length;
        }

        public void Write5_RegisterEx(object[] p)
        {
            base.WriteStartDocument();
            base.TopLevelElement();
            int length = p.Length;
            base.WriteStartElement("RegisterEx", "http://tempuri.org/", null, false);
            if (length > 0)
            {
                base.WriteElementString("softwareSerialNo", "http://tempuri.org/", (string) p[0]);
            }
            if (length > 1)
            {
                base.WriteElementString("key", "http://tempuri.org/", (string) p[1]);
            }
            if (length > 2)
            {
                base.WriteElementString("serialpass", "http://tempuri.org/", (string) p[2]);
            }
            base.WriteEndElement();
        }

        public void Write6_RegisterExInHeaders(object[] p)
        {
            base.WriteStartDocument();
            base.TopLevelElement();
            int length = p.Length;
        }

        public void Write7_RegisterZs(object[] p)
        {
            base.WriteStartDocument();
            base.TopLevelElement();
            int length = p.Length;
            base.WriteStartElement("RegisterZs", "http://tempuri.org/", null, false);
            if (length > 0)
            {
                base.WriteElementString("sn", "http://tempuri.org/", (string) p[0]);
            }
            if (length > 1)
            {
                base.WriteElementString("pwd", "http://tempuri.org/", (string) p[1]);
            }
            if (length > 2)
            {
                base.WriteElementString("province", "http://tempuri.org/", (string) p[2]);
            }
            if (length > 3)
            {
                base.WriteElementString("city", "http://tempuri.org/", (string) p[3]);
            }
            if (length > 4)
            {
                base.WriteElementString("trade", "http://tempuri.org/", (string) p[4]);
            }
            if (length > 5)
            {
                base.WriteElementString("entname", "http://tempuri.org/", (string) p[5]);
            }
            if (length > 6)
            {
                base.WriteElementString("linkman", "http://tempuri.org/", (string) p[6]);
            }
            if (length > 7)
            {
                base.WriteElementString("phone", "http://tempuri.org/", (string) p[7]);
            }
            if (length > 8)
            {
                base.WriteElementString("mobile", "http://tempuri.org/", (string) p[8]);
            }
            if (length > 9)
            {
                base.WriteElementString("email", "http://tempuri.org/", (string) p[9]);
            }
            if (length > 10)
            {
                base.WriteElementString("fax", "http://tempuri.org/", (string) p[10]);
            }
            if (length > 11)
            {
                base.WriteElementString("address", "http://tempuri.org/", (string) p[11]);
            }
            if (length > 12)
            {
                base.WriteElementString("postcode", "http://tempuri.org/", (string) p[12]);
            }
            if (length > 13)
            {
                base.WriteElementString("sign", "http://tempuri.org/", (string) p[13]);
            }
            base.WriteEndElement();
        }

        public void Write8_RegisterZsInHeaders(object[] p)
        {
            base.WriteStartDocument();
            base.TopLevelElement();
            int length = p.Length;
        }
    }
}

